package com.decent.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author decent
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Product implements Serializable {

    private static final long serialVersionUID = -1369942390563149472L;

    private Long id;

    private String goodsNo;

    private String productName;

    private Integer brandId;

    private String picUrl;

    private BigDecimal originalPrice;

    private BigDecimal sellPrice;

    private BigDecimal officialPrice;

    private String discount;

    private Integer stock;

    private Integer total;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date buyAfterEffectiveTime;

    private Integer exchangeAfterEffectiveDay;

    private String attribute;

    private String useNotice;


    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl == null ? null : picUrl.trim();
    }

    public String getDiscount() {
        return discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount == null ? null : discount.trim();
    }


    public String getUseNotice() {
        return useNotice;
    }

    public void setUseNotice(String useNotice) {
        this.useNotice = useNotice == null ? null : useNotice.trim();
    }
}